package com.ybfenpan.controller.member.member;

import com.ybfenpan.controller.core.BaseController;
import com.ybfenpan.model.Member;
import com.ybfenpan.service.MemberService;
import com.ybfenpan.utils.ContextUtil;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;


/**
 * Created by Administrator on 2016/3/25.
 */
@Controller

public class MemberLevelInfoController extends BaseController {
	
	
	@Resource 
	private MemberService memberService;
	

     
    @RequestMapping("member/member/memberLevelInfo.shtml")
    public String list(HttpServletRequest request) throws Exception{
    	
    	Member member = ContextUtil.getMember();
    	member=memberService.getByKey(member.getId());
    	request.setAttribute("member", member);
    	
    	Integer fatherId = member.getFatherId();
    	Member father = this.memberService.getByKey(fatherId);
    	if(father!=null){
    		request.setAttribute("fatherLoginName", father.getLoginName());
    	}
    	
    	
    	
    	
    	
        return "member/member/memberLevelInfo";
    }
    
    
    
 
}
